home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Windows 95 with MFC
/
Programming Windows 95 with MFC (Microsoft Programming Series)(097-0001465)(1996).iso
/
NT
/
CODE
/
CHAP07
/
CLOCK
/
CLOCK.H
< prev
next >
Wrap
C/C++ Source or Header
|
1996-04-05
|
2KB
|
66 lines
//***********************************************************************
//
// Clock.h
//
//***********************************************************************
class CMyApp : public CWinApp
{
public:
virtual BOOL InitInstance ();
};
class CMainWindow : public CFrameWnd
{
private:
BOOL m_bFullWindow;
BOOL m_bStayOnTop;
int m_nPrevSecond;
int m_nPrevMinute;
int m_nPrevHour;
void DrawClockFace (CDC*);
void DrawSecondHand (CDC*, int, int, int, COLORREF);
void DrawHand (CDC*, int, int, int, COLORREF);
void SetTitleBarState ();
void SetTopMostState ();
void SaveWindowState ();
void UpdateSystemMenu (CMenu*);
public:
CMainWindow ();
virtual BOOL PreCreateWindow (CREATESTRUCT&);
BOOL RestoreWindowState ();
protected:
afx_msg int OnCreate (LPCREATESTRUCT);
afx_msg void OnGetMinMaxInfo (MINMAXINFO*);
afx_msg void OnTimer (UINT);
afx_msg void OnPaint ();
afx_msg UINT OnNcHitTest (CPoint);
afx_msg void OnSysCommand (UINT, LPARAM);
afx_msg void OnContextMenu (CWnd*, CPoint);
afx_msg void OnEndSession (BOOL);
afx_msg void OnClose ();
DECLARE_MESSAGE_MAP ()
};
class CAboutDialog : public CDialog
{
private:
CRect m_rect;
public:
CAboutDialog (CWnd* pParentWnd) :
CDialog (IDD_ABOUTDLG, pParentWnd) {}
virtual BOOL OnInitDialog ();
protected:
afx_msg void OnPaint ();
DECLARE_MESSAGE_MAP ()
};